<?php
header('Content-Type:text/html;charset=UTF-8');
// $link = "short_info_list1.php" ; 
require('mysql.php');

//3.sql查询
$usernum = $_POST["usernum"];
$yon = $_POST["yon"];
if($yon=='yes'){
	$sql_time ="select spacetime from apply where studentid = '$usernum'";
	$res = mysql_query($sql_time);
	$row = mysql_fetch_row($res);
	$pass=md5('1234');
	$sq="update apply set checked='yes' where studentid='$usernum'";
	mysql_query($sq);
	$sql = "insert into studentworkinlibrary values ('$usernum','','$row[0]','yes','$pass')";
	$res = mysql_query($sql);
	if($res != null){
		echo "已将该学生加入审核通过列表!";
		echo '<a href="apply_list.php">';
		echo '点击此处回到缩略信息列表</a>';
		echo '学号为'.$usernum.'的学生去搬书了';
		echo "<img src='./images/banshu.gif'>";
	}else {
		echo "该学生已经审核通过,请勿重复审核!";
		echo '<a href="apply_list.php">';
		echo '点击此处回到缩略信息列表</a>';
	}
}else{
	$url = "/libraryoa/view/apply_list.php";
	Header("HTTP/1.1 303 See Other");
	Header("Location: $url");
	exit;
}
?>

<html >
<head >
<meta   http-equiv = "refresh"   content =0; url = <?php echo $link; ?> " >
</head >
<body >
</body >
</html >